#pragma once
#include "SimpleCanvas.h"
#include "View.h"

namespace yzrilyzr_simplecanvas{
	ECLASS(TestView, public View){
		yzrilyzr_util::DT dt;
	public:
	TestView(){

	}
	void onDraw(SkCanvas & canvas)override{
		SkPaint paint;
		paint.setColor(SK_ColorBLUE);
		paint.setAntiAlias(true);
		float ms=dt.getDeltaTime();
		if(ms > 5000)dt.reset();
		SkRRect rrect;
		rrect.setRectXY(SkRect::MakeXYWH(100 + ms * 0.1, 100 + ms * 0.1, 200 + ms * 0.1, 100), 20, 20);
		canvas.drawRRect(rrect, paint);
	}
	};
}